#define _CRT_SECURE_NO_WARNINGS
#include "1.11_hs.h"
void test1()
{
	const int n = 6;
	/*n = 7;*///no
	int const m = 7;
	//m = 6//no
	int* p1 = &n;
	int* p2 = &m;
	*p1 = 7;
	*p2 = 6;
	printf("%d %d",*p1,*p2);
}

void test2()
{
	int n = 1;
	int m = 2;
	const int* p1 = &n;
	int const * p2 = &m;
	/**p1 = 2;//no
	*p2 = 1;*/
	p1 = &m;
	p2 = &n;
	printf("%d %d", *p1, *p2);
}

void test3()
{
	int n = 1;
	int m = 3;
	int* const pi = &n;
	*pi = 3;
	//pi = &m;//no
	printf("%d", *pi);
}

void test4()
{
	int n = 1;
	int m = 7;
	const int* const p1 = &n;
	int const* const p2 = &m;
	//*p1 = 7;//no
	//*p2 = 1;
	//p1 = &m;
	//p2 = &n;
	printf("%d %d", *p1, *p2);
}

struct emp* set_p(struct emp* p, char str[])
{
	strcpy(p->name,str);
	p->age = 22;
	return p;
}

void Print_p(struct emp* p)
{
	printf("%s %d\n", p->name, p->age);
}

int add(int x, int y)
{
	return x + y;
}

int sub(int x, int y)
{
	return x - y;
}

int(*signal(int(*p)(int, int), int a))(int, int)
{
	return p;
}